import com.pbking.util.eventHandling.Event;
import com.pbking.util.eventHandling.IEventBroadcaster;
import com.pbking.util.eventHandling.EventBroadcaster;
import com.pbking.logging.Logger;

/**
 * @author Jason Crist
 */
class com.pbking.util.EasyXML extends XML implements IEventBroadcaster {
	
	public static var LOADED:String = "onLoad";
	public static var ERROR:String = "onError";
	
	function EasyXML(xmlString:String)
	{
		super(xmlString);
		ignoreWhite = true;
		EventBroadcaster.initialize(this);
	}

	function onLoad(success:Boolean)
	{
		if(success)
			dispatch(new Event(LOADED, this));
		else
			dispatch(new Event(ERROR, this));
	}

	// EVENT FUNCTIONS

	public function addEventListener(eventType:String, target:Object, callback:Function, singleEvent:Boolean){}
	public function addSingleEventListener(eventType:String, target:Object, callback:Function){}
	public function removeEventListener(eventType:String, target:Object, callback:Function){}
	public function removeAllEventTypes(eventType:String){}
	public function removeAllEventTargets(target:Object){}
	public function removeAllEvents(){}
	public function dispatch(event:Event){}

}